package com.driver.core;

import java.lang.String;

public class JavaGetSet {

    public static JavaGetSet getJavaGetSet(Column column) {

        JavaGetSet javaGetSet = new JavaGetSet();
        String propertyName = column.getPropertyName();
        String propertyType = column.getPropertyType();
        String upName = propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
        javaGetSet.setPropertyRow("\tprivate " + propertyType + " " + propertyName + ";");
        javaGetSet.setPropertyGet("\n\tpublic " + propertyType + " get" + upName + "() {\n"
                + "\t\treturn " + propertyName + ";"
                + "\n\t}");
        javaGetSet.setPropertySet("\n\tpublic void set" + upName + "(" + propertyType + " " + propertyName + ") {\n"
                + "\t\tthis." + propertyName + " = " + propertyName + ";"
                + "\n\t}");


        return javaGetSet;

    }

    private String propertyRow;
    private String propertyGet;
    private String propertySet;


    public String getPropertyRow() {
        return propertyRow;
    }

    public void setPropertyRow(String propertyRow) {
        this.propertyRow = propertyRow;
    }

    public String getPropertyGet() {
        return propertyGet;
    }

    public void setPropertyGet(String propertyGet) {
        this.propertyGet = propertyGet;
    }

    public String getPropertySet() {
        return propertySet;
    }

    public void setPropertySet(String propertySet) {
        this.propertySet = propertySet;
    }
}
